<template>
	<div>
		<div class="chain-link-bar-wrapper">
		  <el-breadcrumb separator-class="el-icon-arrow-right">
		    <el-breadcrumb-item>首页</el-breadcrumb-item>
		    <el-breadcrumb-item to="/">积分流水（近20条）</el-breadcrumb-item>
		  </el-breadcrumb>  
		</div>
		
		<el-card class="box-card">
		  
		  <div slot="header" class="clearfix">
		    <h3 class="app-h3 app-margin-v-0">
		      积分流水
		    </h3>
		  </div>
		
		  <div class="app-diliver-10"></div>
		  <el-table
		    :data="tableData"
		    border
		    style="width: 100%">
		    <el-table-column
		      prop="descs"
		      label="事件"
		      width="180">
		    </el-table-column>
		    <el-table-column
		      prop="money"
		      label="积分"
		      width="180">
		    </el-table-column>
		    <el-table-column
		      prop="invite"
		      label="邀请人">
		    </el-table-column>
			<el-table-column
				v-if="tableData.descs != '积分提现'"
			  prop="phone"
			  label="电话">
			</el-table-column>
			<el-table-column
			  prop="create_time"
			  label="时间">
			</el-table-column>
		  </el-table>
		 
		</el-card>
	</div>
  
</template>

<script>
  import HomeApi from '../../api/HomeApi.js'
	
  export default {
    data() {
      return {
        tableData: [],
      }
    },
	created(){
	  this.getSta();
	},
	methods:{
		getSta(){
			
		  HomeApi.integral({}, json => {
			  const list = json.list;
			list.forEach((item, index, array) => {
				if(item.descs == '积分提现'){
					item.phone = '';
				}
			});
			this.tableData = json.list;
		  });
		}
	}
  }
</script>

<style>
</style>
